package petstore.web.servlet.login;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


//跳转至登录界面的类
public class LoginForm extends HttpServlet {
    private String LOGIN_PAGE = "/WEB-INF/jsp/loginPage/loginPage.jsp";//登录界面的路径

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.getRequestDispatcher(LOGIN_PAGE).forward(req,resp);//请求转发
    }
}
